package singleton;

import java.util.ArrayList;
import java.util.List;

import view.views.TabEntrys;
import controller.UseCaseController;
import controller.UseCaseControllerImplementation;
import controller.data.Comment;
import controller.data.fundamental.TabItemCategory;
import controller.data.searchRevision.SearchRevisionResponse;

public class Singleton {

	public TabItemCategory selectedTab;
	public TabItemCategory emptyTab;
	public String searchString;
	public UseCaseController useCaseController; // Das Interface zur DB
	public String response;
	public String text;
	public String comment;
	public String title;
	public int position;
	public String commentText;
	public String documentText;
	public String tags = "";
	public List<Comment> commentPrevious;
	public int listPos = 0;
	public boolean getGoForIt;

	public String getResponse() {
		return response;
	}

	public void setResponse(String response) {
		this.response = response;
	}

	// der Dokumentation
	public TabEntrys tabentrys; // Die Tab's
	// Dokumentation
	public List<SearchRevisionResponse> listOfRevisions;

	private static final Singleton INSTANCE = new Singleton();

	private Singleton() {
		emptyTab = new TabItemCategory("","");
		selectedTab = emptyTab;
		searchString = "";
		useCaseController = new UseCaseControllerImplementation();
		listOfRevisions = new ArrayList<SearchRevisionResponse>();
		text = "";
		comment = "";
		title = "";
		position = 0;
		commentText = "";
		documentText = "";
		tags = "";
		List<Comment> commentPrevious = new ArrayList<Comment>();
		listPos = 0;
		getGoForIt = false;
		response = "";
	}

	public static Singleton getInstance() {
		return INSTANCE;
	}

	public String getSearchString() {
		return searchString;
	}

	public void setSearchString(String searchString) {
		this.searchString = searchString;
	}

	public TabItemCategory getSelectedTab() {
		return selectedTab;
	}

	public void setSelectedTab(TabItemCategory selectedTab) {
		this.selectedTab = selectedTab;
	}

	public TabItemCategory getEmptyTab() {
		return emptyTab;
	}

	public void setEmptyTab(TabItemCategory emptyTab) {
		this.emptyTab = emptyTab;
	}

	public UseCaseController getUseCaseController() {
		return useCaseController;
	}

	public void setUseCaseController(UseCaseController useCaseController) {
		this.useCaseController = useCaseController;
	}

	public TabEntrys getTabentrys() {
		return tabentrys;
	}

	public void setTabentrys(TabEntrys tabentrys) {
		this.tabentrys = tabentrys;
	}

	/* gibt den aktuellen Tab zurück */
	public TabItemCategory getActualTab() {
		if (selectedTab == null)
			return emptyTab;
		else
			return selectedTab;
	}

	public List<SearchRevisionResponse> getListOfRevisions() {
		return listOfRevisions;
	}

	public void setListOfRevisions(List<SearchRevisionResponse> listOfRevisions) {
		this.listOfRevisions = listOfRevisions;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getPosition() {
		return position;
	}

	public void setPosition(int position) {
		this.position = position;
	}

	public String getCommentText() {
		return commentText;
	}

	public void setCommentText(String commentText) {
		this.commentText = commentText;
	}

	public String getDocumentText() {
		return documentText;
	}

	public void setDocumentText(String documentText) {
		this.documentText = documentText;
	}

	public String getTags() {
		return tags;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}

	public List<Comment> getCommentPrevious() {
		return commentPrevious;
	}

	public void setCommentPrevious(List<Comment> commentPrevious) {
		this.commentPrevious = commentPrevious;
	}

	public int getListPos() {
		return listPos;
	}

	public void setListPos(int listPos) {
		this.listPos = listPos;
	}

	public boolean isGetGoForIt() {
		return getGoForIt;
	}

	public void setGetGoForIt(boolean getGoForIt) {
		this.getGoForIt = getGoForIt;
	}
}
